package com.wrx.Controller;

import com.wrx.Controller.Result.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

//异常处理器
@RestControllerAdvice
public class ProjectExceptionAdvice {
    @ExceptionHandler(Exception.class)
    public Result doException(Exception ex) {
        System.out.println("出现异常");
        return new Result(500,null,"系统繁忙，请稍后重试");
    }
}
